package day6;

public class demo {
    public double test(){
        int i=10;
        return i;
    }
    public demo test1(){
        demo d = new demo();
        return d;
    }

    public int[] test2(){
        return new int[]{1,2,3,4,5};
    }
    public Child test3(){
        Parent p = new Parent();//父类更大
        return new Child();//子类更小
    }
    public Parent test4(){
        Parent p = new Parent();
        Child c = new Child();
        return c;//p,c正确的
    }
}

class  Parent{

}

class Child extends Parent{

}
